package com.guhappy.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import com.guhappy.model.user.WebUserHome;
import com.opensymphony.xwork2.ActionSupport;

@Action(value="forgetpasswordAction", results={
		@Result(name="success",location="/pages/passwordResetConf.jsp"),
		@Result(name="input",location="/pages/forgetPassword.jsp")
		})
public class ResetPasswordAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String email;
	private String userName;
	
	public String getEmail() {
		return email;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String execute() throws Exception {
		
		/*if (null !=WebUserHome.findByEmail(email))
		{
			// need to do more
			return SUCCESS;
		}else{
			this.addActionError(getText("the_Email_is_not_a_registed_one"));
			return INPUT;
		}*/
		
		//mock start
		
		return SUCCESS;
		
		// mock end
	}

}
